package com.ruoyi.user.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.user.domain.OrderInfo;
import com.ruoyi.user.domain.vo.PassengerVo;
import com.ruoyi.user.service.OrderInfoService;
import com.ruoyi.user.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangqingbin
 * 不要等待机会，而要创造机会
 * @date 2024/10/21 15:28
 **/
@RestController
@RequestMapping("/taxi")
public class TaxiController {


    @Autowired
    private TaskService taskService;

    @Autowired
    private OrderInfoService orderInfoService;

    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    /**
     * 乘客下单
     *
     * @param passengerVo
     * @return com.ruoyi.common.core.web.domain.AjaxResult
     * @author wangqingbin
     * @date 2024/10/21 15:42
     */
    @PostMapping("/saveOrder")
    public AjaxResult saveOrder(@RequestBody PassengerVo passengerVo) {
        return taskService.saveOrder(passengerVo);
    }
}
